import fetch from 'common/src/utils/fetch';

export function findList(data) {
    return fetch({
        url:
      '/api/majorservice/transSubjectPrivilege/selectTransSubjectPrivilegePage',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

export function findOne(id) {
    return fetch({
        url:
      '/api/majorservice/transSubjectPrivilege/findTransSubjectPrivilegeById',
        method: 'get',
        headers: { 'Content-Type': 'application/json' },
        params: {
            id: id
        }
    });
}

export function add(data) {
    return fetch({
        url: '/api/majorservice/transSubjectPrivilege/insertTransSubjectPrivilege',
        method: 'post',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

export function edit(data) {
    return fetch({
        url:
      '/api/majorservice/transSubjectPrivilege/updateTransSubjectPrivilegeById',
        method: 'put',
        headers: { 'Content-Type': 'application/json' },
        data
    });
}

export function deleteData(id) {
    return fetch({
        url:
      '/api/majorservice/transSubjectPrivilege/deleteTransSubjectPrivilegeById',
        method: 'delete',
        headers: { 'Content-Type': 'application/json' },
        params: {
            id: id
        }
    });
}
